﻿@model IEnumerable<Mvc3Blog.Models.Post>
@{
    View.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Index</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
        </th>
        <th>
            Title
        </th>
        <th>
            Body
        </th>
        <th>
            Tags
        </th>
        <th>
            CreatedBy
        </th>
        <th>
            CreatedOn
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id }) | @Html.ActionLink("Details", "Details", new { id = item.Id })
                | @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
            <td>
                @item.Title
            </td>
            <td>
                @item.Body
            </td>
            <td>
                @item.Tags
            </td>
            <td>
                @item.CreatedBy
            </td>
            <td>
                @String.Format("{0:g}", item.CreatedOn)
            </td>
        </tr>
    }
</table>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
